if( NOT DEFINED TIDSP_TYPE)
    message(FATAL_ERROR "Dsp type has to be set e.g. mv64+")
endif()

set(CMAKE_STATIC_LIBRARY_PREFIX "")
set(CMAKE_STATIC_LIBRARY_SUFFIX ".lib")
set(CMAKE_SHARED_LIBRARY_PREFIX "")  
set(CMAKE_SHARED_LIBRARY_SUFFIX ".lib")
set(CMAKE_IMPORT_LIBRARY_PREFIX )
set(CMAKE_IMPORT_LIBRARY_SUFFIX )
set(CMAKE_EXECUTABLE_SUFFIX ".out")
set(CMAKE_LINK_LIBRARY_SUFFIX ".lib")
set(CMAKE_DL_LIBS "")

set(TI_DSP_STANDARD_LIB "")
if("6400+" STREQUAL "${TIDSP_TYPE}")
    set(TI_DSP_STANDARD_LIB "-l rts64plus.lib")
endif()

set(SBE_SPEC_FLAGS "-ppm")
set(SBE_SPEC_EXTRA_DEFINES "")
list(APPEND SBE_SPEC_EXTRA_DEFINES "#define __va_parmadr /* extra */")
list(APPEND SBE_SPEC_EXTRA_DEFINES "#define __va_argref /* extra */")

set(CMAKE_CXX_FLAGS_DEBUG_INIT "-k -mw -O3 -g -D\"_DEBUG\" -D\"CHIP_${TIDSP_CHIP}\" -mv${TIDSP_TYPE} ${SBE_TOOCHAIN_SPECIFIC_DEFINES}")
set(CMAKE_ASM_FLAGS_DEBUG_INIT "-k -mw -O3 -g -D\"_DEBUG\" -D\"CHIP_${TIDSP_CHIP}\" -mv${TIDSP_TYPE} ${SBE_TOOCHAIN_SPECIFIC_DEFINES}")
set(CMAKE_C_FLAGS_DEBUG_INIT "-k -mw -O3 -g -D\"_DEBUG\" -D\"CHIP_${TIDSP_CHIP}\" -mv${TIDSP_TYPE} ${SBE_TOOCHAIN_SPECIFIC_DEFINES}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "${TI_DSP_STANDARD_LIB} -mv${TIDSP_TYPE} --reread_libs --warn_sections --rom_model")

set(CMAKE_CXX_FLAGS_RELEASE_INIT "-k -mw -O3 -D\"CHIP_${TIDSP_CHIP}\" -mv${TIDSP_TYPE} ${SBE_TOOCHAIN_SPECIFIC_DEFINES}")
set(CMAKE_ASM_FLAGS_RELEASE_INIT "-k -mw -O3 -D\"CHIP_${TIDSP_CHIP}\" -mv${TIDSP_TYPE} ${SBE_TOOCHAIN_SPECIFIC_DEFINES}")
set(CMAKE_C_FLAGS_RELEASE_INIT "-k -mw -O3 -D\"CHIP_${TIDSP_CHIP}\" -mv${TIDSP_TYPE} ${SBE_TOOCHAIN_SPECIFIC_DEFINES}")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT "${TI_DSP_STANDARD_LIB} -mv${TIDSP_TYPE} --reread_libs --warn_sections --rom_model")

set(CMAKE_CXX_FLAGS_DEBUGWITHCOVERAGE "-k -mw -O3 -g -D\"_DEBUG\" -D\"CHIP_${TIDSP_CHIP}\" -mv${TIDSP_TYPE} ${SBE_TOOCHAIN_SPECIFIC_DEFINES}")
set(CMAKE_ASM_FLAGS_DEBUGWITHCOVERAGE "-k -mw -O3 -g -D\"_DEBUG\" -D\"CHIP_${TIDSP_CHIP}\" -mv${TIDSP_TYPE} ${SBE_TOOCHAIN_SPECIFIC_DEFINES}")
set(CMAKE_C_FLAGS_DEBUGWITHCOVERAGE "-k -mw -O3 -g -D\"_DEBUG\" -D\"CHIP_${TIDSP_CHIP}\" -mv${TIDSP_TYPE} ${SBE_TOOCHAIN_SPECIFIC_DEFINES}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUGWITHCOVERAGE "${TI_DSP_STANDARD_LIB} -mv${TIDSP_TYPE} --reread_libs --warn_sections --rom_model")

